/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	RenderEntryBindParameters.cpp
*
*	Comments	-	See RenderEntryBindParameters.h
*
**************************************************************************************/
#include "../Include/RenderEntryBindParameters.h"
#include "../Include/IParameterBinder.h"

namespace Pulse
{
	IParameterBinder * RenderEntryBindParameters::AddParameter( IParameter *pParameter )
	{
		if ( pParameter )
		{
			return m_paramBinders.AddParameterBinder( pParameter );
		}

		return PSX_NULL;
	}

	IParameterBinder * RenderEntryBindParameters::FindParameterBinder( IParameter *pParameter )
	{
		return m_paramBinders.GetParameterBinder( pParameter );
	}

	void RenderEntryBindParameters::Execute( GraphicsPipeline *pPipeline )
	{
		for ( SIZE_T i = 0; i < m_paramBinders.GetNumParameterBinders(); ++i )
		{
			m_paramBinders.GetParameterBinder( (UINT)i )->BindValue();
		}
	}

}